.class public Lcom/xingbook/gusturelock/LockSetupActivity;
.super Landroid/app/Activity;

# interfaces
.implements Landroid/view/View$OnClickListener;
.implements Lcom/xingbook/gusturelock/c;


# instance fields
.field private a:Lcom/xingbook/gusturelock/LockPatternView;

.field private b:Landroid/widget/Button;

.field private c:Landroid/widget/Button;

.field private d:I

.field private e:Ljava/util/List;

.field private f:Z


# direct methods
.method public constructor <init>()V
    .locals 1

    invoke-direct {p0}, Landroid/app/Activity;-><init>()V

    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/xingbook/gusturelock/LockSetupActivity;->f:Z

    return-void
.end method

.method private c()V
    .locals 4

    const/4 v3, 0x1

    const v1, 0x7f080002

    const/4 v2, 0x0

    iget v0, p0, Lcom/xingbook/gusturelock/LockSetupActivity;->d:I

    packed-switch v0, :pswitch_data_0

    :goto_0
    return-void

    :pswitch_0
    iget-object v0, p0, Lcom/xingbook/gusturelock/LockSetupActivity;->b:Landroid/widget/Button;

    invoke-virtual {v0, v1}, Landroid/widget/Button;->setText(I)V

    iget-object v0, p0, Lcom/xingbook/gusturelock/LockSetupActivity;->c:Landroid/widget/Button;

    const-string v1, ""

    invoke-virtual {v0, v1}, Landroid/widget/Button;->setText(Ljava/lang/CharSequence;)V

    iget-object v0, p0, Lcom/xingbook/gusturelock/LockSetupActivity;->c:Landroid/widget/Button;

    invoke-virtual {v0, v2}, Landroid/widget/Button;->setEnabled(Z)V

    const/4 v0, 0x0

    iput-object v0, p0, Lcom/xingbook/gusturelock/LockSetupActivity;->e:Ljava/util/List;

    iput-boolean v2, p0, Lcom/xingbook/gusturelock/LockSetupActivity;->f:Z

    iget-object v0, p0, Lcom/xingbook/gusturelock/LockSetupActivity;->a:Lcom/xingbook/gusturelock/LockPatternView;

    invoke-virtual {v0}, Lcom/xingbook/gusturelock/LockPatternView;->a()V

    iget-object v0, p0, Lcom/xingbook/gusturelock/LockSetupActivity;->a:Lcom/xingbook/gusturelock/LockPatternView;

    invoke-virtual {v0}, Lcom/xingbook/gusturelock/LockPatternView;->c()V

    goto :goto_0

    :pswitch_1
    iget-object v0, p0, Lcom/xingbook/gusturelock/LockSetupActivity;->b:Landroid/widget/Button;

    const v1, 0x7f0801fa

    invoke-virtual {v0, v1}, Landroid/widget/Button;->setText(I)V

    iget-object v0, p0, Lcom/xingbook/gusturelock/LockSetupActivity;->c:Landroid/widget/Button;

    const v1, 0x7f0801fb

    invoke-virtual {v0, v1}, Landroid/widget/Button;->setText(I)V

    iget-object v0, p0, Lcom/xingbook/gusturelock/LockSetupActivity;->c:Landroid/widget/Button;

    invoke-virtual {v0, v3}, Landroid/widget/Button;->setEnabled(Z)V

    iget-object v0, p0, Lcom/xingbook/gusturelock/LockSetupActivity;->a:Lcom/xingbook/gusturelock/LockPatternView;

    invoke-virtual {v0}, Lcom/xingbook/gusturelock/LockPatternView;->b()V

    goto :goto_0

    :pswitch_2
    iget-object v0, p0, Lcom/xingbook/gusturelock/LockSetupActivity;->b:Landroid/widget/Button;

    invoke-virtual {v0, v1}, Landroid/widget/Button;->setText(I)V

    iget-object v0, p0, Lcom/xingbook/gusturelock/LockSetupActivity;->c:Landroid/widget/Button;

    const-string v1, ""

    invoke-virtual {v0, v1}, Landroid/widget/Button;->setText(Ljava/lang/CharSequence;)V

    iget-object v0, p0, Lcom/xingbook/gusturelock/LockSetupActivity;->c:Landroid/widget/Button;

    invoke-virtual {v0, v2}, Landroid/widget/Button;->setEnabled(Z)V

    iget-object v0, p0, Lcom/xingbook/gusturelock/LockSetupActivity;->a:Lcom/xingbook/gusturelock/LockPatternView;

    invoke-virtual {v0}, Lcom/xingbook/gusturelock/LockPatternView;->a()V

    iget-object v0, p0, Lcom/xingbook/gusturelock/LockSetupActivity;->a:Lcom/xingbook/gusturelock/LockPatternView;

    invoke-virtual {v0}, Lcom/xingbook/gusturelock/LockPatternView;->c()V

    goto :goto_0

    :pswitch_3
    iget-object v0, p0, Lcom/xingbook/gusturelock/LockSetupActivity;->b:Landroid/widget/Button;

    invoke-virtual {v0, v1}, Landroid/widget/Button;->setText(I)V

    iget-boolean v0, p0, Lcom/xingbook/gusturelock/LockSetupActivity;->f:Z

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/gusturelock/LockSetupActivity;->c:Landroid/widget/Button;

    const v1, 0x7f0801fc

    invoke-virtual {v0, v1}, Landroid/widget/Button;->setText(I)V

    iget-object v0, p0, Lcom/xingbook/gusturelock/LockSetupActivity;->c:Landroid/widget/Button;

    invoke-virtual {v0, v3}, Landroid/widget/Button;->setEnabled(Z)V

    iget-object v0, p0, Lcom/xingbook/gusturelock/LockSetupActivity;->a:Lcom/xingbook/gusturelock/LockPatternView;

    invoke-virtual {v0}, Lcom/xingbook/gusturelock/LockPatternView;->b()V

    goto :goto_0

    :cond_0
    iget-object v0, p0, Lcom/xingbook/gusturelock/LockSetupActivity;->c:Landroid/widget/Button;

    const-string v1, ""

    invoke-virtual {v0, v1}, Landroid/widget/Button;->setText(Ljava/lang/CharSequence;)V

    iget-object v0, p0, Lcom/xingbook/gusturelock/LockSetupActivity;->a:Lcom/xingbook/gusturelock/LockPatternView;

    sget-object v1, Lcom/xingbook/gusturelock/b;->c:Lcom/xingbook/gusturelock/b;

    invoke-virtual {v0, v1}, Lcom/xingbook/gusturelock/LockPatternView;->setDisplayMode(Lcom/xingbook/gusturelock/b;)V

    iget-object v0, p0, Lcom/xingbook/gusturelock/LockSetupActivity;->a:Lcom/xingbook/gusturelock/LockPatternView;

    invoke-virtual {v0}, Lcom/xingbook/gusturelock/LockPatternView;->c()V

    iget-object v0, p0, Lcom/xingbook/gusturelock/LockSetupActivity;->c:Landroid/widget/Button;

    invoke-virtual {v0, v2}, Landroid/widget/Button;->setEnabled(Z)V

    goto/16 :goto_0

    nop

    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_0
        :pswitch_1
        :pswitch_2
        :pswitch_3
    .end packed-switch
.end method


# virtual methods
.method public a()V
    .locals 0

    return-void
.end method

.method public a(Ljava/util/List;)V
    .locals 0

    return-void
.end method

.method public b()V
    .locals 0

    return-void
.end method

.method public b(Ljava/util/List;)V
    .locals 3

    const/4 v2, 0x4

    const/4 v1, 0x1

    invoke-interface {p1}, Ljava/util/List;->size()I

    move-result v0

    if-ge v0, v2, :cond_0

    const v0, 0x7f0801fd

    invoke-static {p0, v0, v1}, Landroid/widget/Toast;->makeText(Landroid/content/Context;II)Landroid/widget/Toast;

    move-result-object v0

    invoke-virtual {v0}, Landroid/widget/Toast;->show()V

    iget-object v0, p0, Lcom/xingbook/gusturelock/LockSetupActivity;->a:Lcom/xingbook/gusturelock/LockPatternView;

    sget-object v1, Lcom/xingbook/gusturelock/b;->c:Lcom/xingbook/gusturelock/b;

    invoke-virtual {v0, v1}, Lcom/xingbook/gusturelock/LockPatternView;->setDisplayMode(Lcom/xingbook/gusturelock/b;)V

    :goto_0
    return-void

    :cond_0
    iget-object v0, p0, Lcom/xingbook/gusturelock/LockSetupActivity;->e:Ljava/util/List;

    if-nez v0, :cond_1

    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0, p1}, Ljava/util/ArrayList;-><init>(Ljava/util/Collection;)V

    iput-object v0, p0, Lcom/xingbook/gusturelock/LockSetupActivity;->e:Ljava/util/List;

    const/4 v0, 0x2

    iput v0, p0, Lcom/xingbook/gusturelock/LockSetupActivity;->d:I

    invoke-direct {p0}, Lcom/xingbook/gusturelock/LockSetupActivity;->c()V

    goto :goto_0

    :cond_1
    iget-object v0, p0, Lcom/xingbook/gusturelock/LockSetupActivity;->e:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_2

    iput-boolean v1, p0, Lcom/xingbook/gusturelock/LockSetupActivity;->f:Z

    :goto_1
    iput v2, p0, Lcom/xingbook/gusturelock/LockSetupActivity;->d:I

    invoke-direct {p0}, Lcom/xingbook/gusturelock/LockSetupActivity;->c()V

    goto :goto_0

    :cond_2
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/xingbook/gusturelock/LockSetupActivity;->f:Z

    goto :goto_1
.end method

.method public onClick(Landroid/view/View;)V
    .locals 5

    const/4 v4, 0x4

    const/4 v3, 0x3

    const/4 v2, 0x2

    const/4 v1, 0x1

    invoke-virtual {p1}, Landroid/view/View;->getId()I

    move-result v0

    packed-switch v0, :pswitch_data_0

    :cond_0
    :goto_0
    return-void

    :pswitch_0
    iget v0, p0, Lcom/xingbook/gusturelock/LockSetupActivity;->d:I

    if-eq v0, v1, :cond_1

    iget v0, p0, Lcom/xingbook/gusturelock/LockSetupActivity;->d:I

    if-eq v0, v3, :cond_1

    iget v0, p0, Lcom/xingbook/gusturelock/LockSetupActivity;->d:I

    if-ne v0, v4, :cond_2

    :cond_1
    invoke-virtual {p0}, Lcom/xingbook/gusturelock/LockSetupActivity;->finish()V

    goto :goto_0

    :cond_2
    iget v0, p0, Lcom/xingbook/gusturelock/LockSetupActivity;->d:I

    if-ne v0, v2, :cond_0

    iput v1, p0, Lcom/xingbook/gusturelock/LockSetupActivity;->d:I

    invoke-direct {p0}, Lcom/xingbook/gusturelock/LockSetupActivity;->c()V

    goto :goto_0

    :pswitch_1
    iget v0, p0, Lcom/xingbook/gusturelock/LockSetupActivity;->d:I

    if-ne v0, v2, :cond_3

    iput v3, p0, Lcom/xingbook/gusturelock/LockSetupActivity;->d:I

    invoke-direct {p0}, Lcom/xingbook/gusturelock/LockSetupActivity;->c()V

    goto :goto_0

    :cond_3
    iget v0, p0, Lcom/xingbook/gusturelock/LockSetupActivity;->d:I

    if-ne v0, v4, :cond_0

    const-string v0, "lock"

    const/4 v1, 0x0

    invoke-virtual {p0, v0, v1}, Lcom/xingbook/gusturelock/LockSetupActivity;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;

    move-result-object v0

    invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v0

    const-string v1, "lock_key"

    iget-object v2, p0, Lcom/xingbook/gusturelock/LockSetupActivity;->e:Ljava/util/List;

    invoke-static {v2}, Lcom/xingbook/gusturelock/LockPatternView;->a(Ljava/util/List;)Ljava/lang/String;

    move-result-object v2

    invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;

    move-result-object v0

    invoke-interface {v0}, Landroid/content/SharedPreferences$Editor;->commit()Z

    new-instance v0, Landroid/content/Intent;

    const-class v1, Lcom/xingbook/gusturelock/LockActivity;

    invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    invoke-virtual {p0, v0}, Lcom/xingbook/gusturelock/LockSetupActivity;->startActivity(Landroid/content/Intent;)V

    invoke-virtual {p0}, Lcom/xingbook/gusturelock/LockSetupActivity;->finish()V

    goto :goto_0

    :pswitch_data_0
    .packed-switch 0x7f0a005e
        :pswitch_0
        :pswitch_1
    .end packed-switch
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 1

    invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V

    const v0, 0x7f030001

    invoke-virtual {p0, v0}, Lcom/xingbook/gusturelock/LockSetupActivity;->setContentView(I)V

    const v0, 0x7f0a005d

    invoke-virtual {p0, v0}, Lcom/xingbook/gusturelock/LockSetupActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lcom/xingbook/gusturelock/LockPatternView;

    iput-object v0, p0, Lcom/xingbook/gusturelock/LockSetupActivity;->a:Lcom/xingbook/gusturelock/LockPatternView;

    iget-object v0, p0, Lcom/xingbook/gusturelock/LockSetupActivity;->a:Lcom/xingbook/gusturelock/LockPatternView;

    invoke-virtual {v0, p0}, Lcom/xingbook/gusturelock/LockPatternView;->setOnPatternListener(Lcom/xingbook/gusturelock/c;)V

    const v0, 0x7f0a005e

    invoke-virtual {p0, v0}, Lcom/xingbook/gusturelock/LockSetupActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/Button;

    iput-object v0, p0, Lcom/xingbook/gusturelock/LockSetupActivity;->b:Landroid/widget/Button;

    const v0, 0x7f0a005f

    invoke-virtual {p0, v0}, Lcom/xingbook/gusturelock/LockSetupActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/Button;

    iput-object v0, p0, Lcom/xingbook/gusturelock/LockSetupActivity;->c:Landroid/widget/Button;

    const/4 v0, 0x1

    iput v0, p0, Lcom/xingbook/gusturelock/LockSetupActivity;->d:I

    invoke-direct {p0}, Lcom/xingbook/gusturelock/LockSetupActivity;->c()V

    return-void
.end method

.method public onCreateOptionsMenu(Landroid/view/Menu;)Z
    .locals 2

    invoke-virtual {p0}, Lcom/xingbook/gusturelock/LockSetupActivity;->getMenuInflater()Landroid/view/MenuInflater;

    move-result-object v0

    const/high16 v1, 0x7f0d

    invoke-virtual {v0, v1, p1}, Landroid/view/MenuInflater;->inflate(ILandroid/view/Menu;)V

    const/4 v0, 0x1

    return v0
.end method

.method protected onPause()V
    .locals 1

    invoke-super {p0}, Landroid/app/Activity;->onPause()V

    invoke-static {p0}, Lcom/baidu/mobstat/StatService;->onPause(Landroid/content/Context;)V

    invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/a/a/g;->b(Ljava/lang/String;)V

    invoke-static {p0}, Lcom/a/a/g;->a(Landroid/content/Context;)V

    return-void
.end method

.method protected onResume()V
    .locals 1

    invoke-super {p0}, Landroid/app/Activity;->onResume()V

    invoke-static {p0}, Lcom/baidu/mobstat/StatService;->onResume(Landroid/content/Context;)V

    invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/a/a/g;->a(Ljava/lang/String;)V

    invoke-static {p0}, Lcom/a/a/g;->b(Landroid/content/Context;)V

    return-void
.end method
